function resize_window(){
	$("#left").height($(window).height()-102);
	$("#right").height($(window).height()-82).width($(window).width()-201);
}
$(function(){
	resize_window();
	$(window).resize(function(){
		resize_window();
	})
})

//弹框
$(document).ready(function(){
	var del = $('.del');
	
	var body = $('body');
	var zhezhao = "<div class='zhezhao'></div>";
	var tanK = "<div class='tanK'><h3>消息</h3><div>你确定要删除吗</div><a href='javascript:void(0)' class='bt2'>确定</a><a href='javascript:void(0)' class='bt1'>取消</a></div>";
	
	del.click(function (){
		var the = $(this);
		body.append(zhezhao); 
		body.append(tanK); 
		var zz = $('.zhezhao');
		var tk = $('.tanK');
		var b1 = $('.bt1');
		var b2 = $('.bt2');
		zz.css('display','block');
		tk.css('display','block');
		
		b2.click(function (){
			location.href=the.attr('href');
		})
		
		b1.click(function (){
			zz.remove();
			tk.remove();
		})
		return false;
	})
	
})

//上传预览
/*
$(function (){
	var file = document.getElementById('files');
	
	file = file == null ? {} : file;
	
	var imgs = $('#fileImg');

	
	file.onblur = function (){
		for(var i =0; i < this.files.length; i++){
			var reader = new FileReader();//每循环一次都要重新new一个FileReader实例
			console.log(this.files[i]);
			reader.readAsDataURL(this.files[i]);
			
			reader.onload=function(e){		
 
				var img = "<img src="+e.target.result+"/>";
				imgs.html(img);
            };
			 
		}
	}              
})
*/